"""server URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
# from django.conf.urls import url
from apps import systemctl, vms, release, fault, backup

urlpatterns = [
    path('login/', systemctl.login),

    path('health', systemctl.health),
    path('', systemctl.login),
    path('systemctl/product/', systemctl.product),
    path('systemctl/listcommand/', systemctl.listcommand),
    path('systemctl/addcommand/', systemctl.addcommand),
    path('systemctl/editcommand/', systemctl.editcommand),
    path('systemctl/delcommand/', systemctl.delcommand),



    path('systemctl/back/', systemctl.back),
    path('systemctl/add_back/', systemctl.add_back),
    path('systemctl/edit_back/', systemctl.edit_back),
    path('systemctl/del_back/', systemctl.del_back),
    path('systemctl/install/', systemctl.install),
    path('systemctl/listconf/', systemctl.listconf),
    path('systemctl/editconf/', systemctl.editconf),
    path('systemctl/addconf/', systemctl.addconf),
    path('systemctl/listmenu/', systemctl.listmenu),
    path('systemctl/addmenu/', systemctl.addmenu),
    path('systemctl/editmenu/', systemctl.editmenu),
    path('systemctl/delmenu/', systemctl.delmenu),
    path('systemctl/listrole/', systemctl.listrole),
    path('systemctl/addrole/', systemctl.addrole),
    path('systemctl/editrole/', systemctl.editrole),
    path('systemctl/delrole/', systemctl.delrole),
    path('systemctl/listproduct/', systemctl.listproduct),
    path('systemctl/addproduct/', systemctl.addproduct),
    path('systemctl/editproduct/', systemctl.editproduct),
    path('systemctl/delproduct/', systemctl.delproduct),
    path('systemctl/listgroup/', systemctl.listgroup),
    path('systemctl/addgroup/', systemctl.addgroup),
    path('systemctl/editgroup/', systemctl.editgroup),
    path('systemctl/delgroup/', systemctl.delgroup),
    path('systemctl/listuser/', systemctl.listuser),
    path('systemctl/adduser/', systemctl.adduser),
    path('systemctl/edituser/', systemctl.edituser),
    path('systemctl/deluser/', systemctl.deluser),
    path('systemctl/listtemplates', systemctl.listtemplates),
    path('systemctl/edittemplates', systemctl.edittemplates),
    path('systemctl/addtemplates', systemctl.addtemplates),
    path('systemctl/deltemplates', systemctl.deltemplates),

    # path('systemctl/user/', systemctl.listuser),
    # path('systemctl/edituser/', systemctl.edituser),
    # path('systemctl/adduser/', systemctl.adduser),

    #
    # path('systemctl/task/', systemctl.listtask),
    # path('systemctl/add_task/', systemctl.add_task),
    # path('systemctl/edit_task/', systemctl.edit_task),
    # path('systemctl/del_task/', systemctl.del_task),

    # git仓库管理
    path('git/list', vms.list_vms),
    path('git/add', vms.add_vms),
    path('git/edit', vms.edit_vms),

    # 发版管理
    path('release/list', release.list_release),
    path('release/add', release.add_release),
    path('release/edit', release.edit_release),
    path('release/delete', release.delete_release),

    # 故障管理
    path('fault/list', fault.list_fault),
    path('fault/add', fault.add_fault),
    path('fault/edit', fault.edit_fault),
    path('fault/delete', fault.delete_fault),

    # 备份管理
    path('backup/list', backup.list_backup),
    path('backup/add', backup.add_backup),
    path('backup/edit', backup.edit_backup),
    path('backup/delete', backup.delete_backup),
    # 项目部署
    # 暂时合并进入Pod配置中
    # path('project/deploy', project.deploy),

]


# urlpatterns = [
#     path('admin/', admin.site.urls),
# ]
